import { defineStore } from "pinia";

// 组合式API store
const useCountStore = defineStore("count", () => {
  // state
  const count = ref(0);

  // actions
  const increment = () => {
    // console.log("increment");
    count.value++;
  };

  console.log("count store", count);
  return {
    count: count,
    increment,
  };
});

export default useCountStore;
